Streams photoSelector Class
Interface for selecting facebook photos from user albums
Constructor
Streams photoSelector
-
[options]
-
[$options.fetchBy='album']
-
[$options.preprocessAlbums]
-
[$options.preprocessPhotos]
Parameters:
-
[options]
Object optionalthis object contains function parameters
-
[onSelect]
Q.Event optionalTriggered when the user selects a photo.
-
[beforePhotos]
Q.Event optionalTriggered when photos are about to be rendered.
-
[onPhotos]
Q.Event optionalTriggered when photos have been rendered.
-
[onPhotosLoaded]
Q.Event optionalTriggered when the photos have all been loaded.
-
[uid='me']
String optionalOptional. The uid of the user on the platform whose photos are shown. Facebook only allows 'me' or a page id as a value.
-
[onLoad]
Q.Event optionalQ.Event, callback or callback string name which is called when bunch of photos has been loaded.
-
[onError]
Q.Event optionalQ.Event, callback or callback string which will be called for each image that is unable to load. Image DOM element will be passed as first argument.
-
[platform='facebook]
String optionalHas to be "facebook" for now.
-
[prompt=false]
String optionalSpecifies type of prompt if user is not logged in or didn't give required permission for the tool. Can be either 'button', 'dialog' or null|false. In first case just shows simple button which opens facebook login popup. In second case shows Users.facebookDialog prompting user to login. In third case will not show any prompt and will just hide the tool.
-
[promptTitle]
String optionalUsed only when 'prompt' equals 'dialog' - will be title of the dialog.
-
[promptText]
String optionalUsed either for button caption when 'prompt' equals 'button' or dialog text when 'prompt' equals 'dialog'.
-
[oneLine]
Boolean optionalIf true, all the images are shown in a large horizontally scrolling line.
-
[cache]
Boolean optionalIf true, photos will be cached using localStorage (if available).
-
-
[$options.fetchBy='album']
String optionalThe tool supports different algoriths for fetching photos. Can be either by 'album' or 'tags'. Maybe more will be added later.
-
[$options.preprocessAlbums]
String optionalOptional function to process the albums array before presenting it in the select. Receives a reference to the albums array as the first parameter, and a callback to call when it's done as the second.
-
[$options.preprocessPhotos]
String optionalOptional function to process the photos array before presenting it in the select. Receives a reference to the albums array as the first parameter, and a callback to call when it's done as the second.